package day_07.oop;

/**
 * @ClassName Phone
 * @Description TODO
 * @Author hp
 * @Date 2021/6/10 16:07
 * @Version 1.0
 **/
public class Phone {
        private String brand;
        private int price;
        private String model;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Phone(String brand, int price, String model) {
        this.brand = brand;
        this.price = price;
        this.model = model;
    }

    public Phone() {
    }

    public void call(String brand){
        System.out.println("使用"+brand+"手机拨打电话");
    }
    public  void sendMessage(String brand){
        System.out.println("使用"+brand+"手机发送短信");
    }

    @Override
    public String toString() {
        return "Phone{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                ", model='" + model + '\'' +
                '}';
    }
}
